package com.aios.model;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import com.aios.util.MappingUtil;

public class AmountPowerModel {
	
	private Integer report_type;
	private List<Tap> tap_list;

	public AmountPowerModel(Integer groupId, Integer reportType, Calendar startDate, Calendar endDate){
		this.report_type = reportType;
		populate(groupId, startDate, endDate);
	}
	
	public Integer getReport_type() {
		return report_type;
	}

	public List<Tap> getTap_list() {
		return tap_list;
	}

	public void setTap_list(List<Tap> tap_list) {
		this.tap_list = tap_list;
	}
	
	private void populate(Integer groupId, Calendar startDate, Calendar endDate) {
		tap_list = new ArrayList<Tap>();
		
		List<Integer> tapIdList = MappingUtil.TapGroupMap.get(groupId);
		
		for(Integer i: tapIdList) {
			tap_list.add(new Tap(i, startDate, endDate));
		}
	}

}
